package com.matrix.calculator;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

/**
 * Class Name: Container
 * Description: Main Activity to work as a container for the two activities 
 * "MatrixActivity" and "VectorActivity" which represent the two tabs "matrix"
 *  and "Vector".
 *
 * @author Sultan-PC
 * @version 1.00
 * @date Feb 10th, 2011
 * 
**/
public class Container extends TabActivity 
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TabHost tabHost = (TabHost)findViewById(android.R.id.tabhost);
        TabSpec firstTabSpec = tabHost.newTabSpec("tid1");
        TabSpec secondTabSpec = tabHost.newTabSpec("tid1");
        firstTabSpec.setIndicator("Matrix").setContent(new Intent(this,Matrix.class));
        secondTabSpec.setIndicator("Vector").setContent(new Intent(this,Vector.class));
        tabHost.addTab(firstTabSpec);
        tabHost.addTab(secondTabSpec);
    }
}